package com.cyy.singleton_pattern;

/**
 * 单例模式(线程不安全的懒汉式)
 */
public class LazyModeOne1 {
    private String name;
    private static LazyModeOne1 lazyModeOne1;

    public static LazyModeOne1 getInstance(){
        if(lazyModeOne1 == null){
            lazyModeOne1 = new LazyModeOne1();
        }
        return lazyModeOne1;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
